Skip to content

[pickers] Merge slotProps.sectionContent in PickersInputBase - #22324

Merged
LukasTy merged 8 commits into
mui:masterfrom
rin:fix/pickers-merge-section-content-slot-props
May 20, 2026
Merged

[pickers] Merge slotProps.sectionContent in PickersInputBase#22324
LukasTy merged 8 commits into
mui:masterfrom
rin:fix/pickers-merge-section-content-slot-props

Conversation

@rin

@rin rin commented May 5, 2026

Copy link
Copy Markdown
Contributor

Ran into this when trying to put props on each date/time segment for accessibility (aria attributes for the spin buttons). The slotProps don't get passed through all the way, because the internal PickersInputBase is replacing the section slot props, instead of merging in any passed sectionContent slot props.

@rin
rin force-pushed the fix/pickers-merge-section-content-slot-props branch from 462f711 to f7df1f4 Compare May 5, 2026 12:18
@rin
rin force-pushed the fix/pickers-merge-section-content-slot-props branch from f7df1f4 to f9812aa Compare May 5, 2026 12:19
@zannager zannager added the scope: pickers Changes related to the date/time pickers. label May 5, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented May 5, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-22324--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 🔺+105B(+0.05%) 🔺+42B(+0.07%)
@mui/x-date-pickers-pro 🔺+105B(+0.03%) 🔺+31B(+0.04%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@LukasTy LukasTy added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label May 13, 2026
LukasTy and others added 2 commits May 19, 2026 17:44
- Add test for callback form of slotProps.sectionContent
- Simplify mergePickersInputBaseSectionContentSlotProps helper to a single closure
- Import PickersSectionListSlotProps from the PickersSectionList barrel

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@LukasTy LukasTy changed the title [pickers] Merge slotProps.sectionContent in PickersInputBase [pickers] Merge slotProps.sectionContent in PickersInputBase May 20, 2026

@LukasTy LukasTy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your contribution. 🙏

I took the liberty of slightly cleaning up the PR. 😊

@LukasTy
LukasTy enabled auto-merge (squash) May 20, 2026 09:45
@LukasTy
LukasTy merged commit a08ddfc into mui:master May 20, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: pickers Changes related to the date/time pickers. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants